import jsonp2 from 'jsonp'
export default class Axios {
    static jsonp(options){
       return  new Promise((resolve,reject)=>{
            jsonp2(options.url,{
                param:'callback'
            },function(err,response=0){
                if(response.status === 'success') {
                    resolve(response)
                }else {
                    console.log('一次没连上百度天气api')
                    console.log(err)
                     reject (response.message)
                }
            })
        })
    }
}